package com.vue.back.vbd.sys.controller;

import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping(value = "/")
public class LoginController {

    @PostMapping(value = "login")
    public Map<String,Object> login(@RequestBody  Map<String,Object> params){
        System.out.println("-----"+params);
        System.out.println("-----"+params);
        Map<String,Object> result = new HashMap<String,Object>();
        result.put("token","33232");
        result.put("msg","账号密码错误");
        result.put("success",true);
        result.put("code",200);
        return result;
    }

    @PostMapping(value = "getInfo")
    public Map<String,Object> getInfo(@RequestParam String token){
        Map<String,Object> result = new HashMap<String,Object>();
        result.put("avator","avator");
        result.put("user_name","林泽锋");
        result.put("user_id",123);
        result.put("access",123);
        result.put("code",200);
        return result;
    }

}
